﻿package org.bbdesign.airbuzz {
	import flash.display.*;
	import flash.events.*;
	/**
	 * ...
	 * @author Jay Lonnquist - Broken Butterfly Design.
	 * ...
	 */
	public class Main extends Sprite {
		private var _stagewidth:Number;
		private var _stageheight:Number;
		////////////////////////////
		//Constructor.
		////////////////////////////
		public function Main():void {
			if (stage) {
				init();
			} else {
				addEventListener(Event.ADDED_TO_STAGE, init);
			}
		}
		////////////////////////////

		////////////////////////////
		//Private methods.
		////////////////////////////

		////////////////////////////

		////////////////////////////
		//Init application.
		////////////////////////////
		private function init(e:Event = null):void {
			removeEventListener(Event.ADDED_TO_STAGE, init);
			////////////////////////////
			//Initialize custom chrome.
			var appchrome:Customchrome = new Customchrome();
			addChild(appchrome);
			////////////////////////////
			//Application entry point.
			_stagewidth = stage.stageWidth;
			_stageheight = stage.stageHeight;
			var app:Application = new Application(_stagewidth, _stageheight);
			addChild(app);
			////////////////////////////
		}
		////////////////////////////
	}

}
